<?php echo $header; ?>
<div class="container make-bg">
<?php echo $content_top; ?>

<?php if(isset($category_id) && $category_id  >=39 && $category_id <= 43) {?>	
         	<ul class="breadcrumb">
                <?php foreach ($breadcrumbs as $breadcrumb) { ?>
			    <?php echo $breadcrumb['separator']; ?><a href="<?php echo $breadcrumb['href']; ?>"><?php echo $breadcrumb['text']; ?></a>
			    <?php } ?>
            </ul>
            
		<div class="row">
			<div class="span12 post">
				<h2 class="page-header"><span><?php echo $heading_title; ?></span></h2>
				<div class="sidebar-line"><span></span></div>                    

    <div class="row">

      <div class="span8">
        <div id="carousel" class="carousel slide" data-interval="false">
          <div class="carousel-inner">
          	
          	<?php if ($thumb || $images) { ?>
                            <?php if ($thumb) { ?>
                               <div class="active item"><img id="demo4" src="<?php echo $thumb; ?>"></div>
						    <?php } else { ?>
						      
							 <?php foreach ($images as $image) { ?>
							  <div class="item"><img src="<?php echo $image['popup']; ?>" alt="" width="770"></div>
					        <?php } ?>
						<?php } ?>
						 <?php } ?>
          </div>
          <a class="carousel-control left" href="#" data-target="#carousel" data-slide="prev">‹</a>
          <a class="carousel-control right" href="#" data-target="#carousel" data-slide="next">›</a>
        </div>
      </div><!-- .span8 -->

      <div class="span4">
        <p class="lead"><?php echo $heading_title; ?></p>
        <p><?php echo $description; ?></p>

        <a class="btn btn-general">View Project</a> 

		<div class="deal-share">
			<!-- AddThis Button BEGIN -->
			<div class="addthis_toolbox addthis_default_style">
				<a class="addthis_button_facebook_like" fb:like:layout="button_count"></a>
				<a class="addthis_button_tweet"></a>
				<a class="addthis_button_google_plusone" g:plusone:size="medium"></a>
			</div>
		<script type="text/javascript" src="//s7.addthis.com/js/300/addthis_widget.js#pubid=undefined"></script>
			<!-- AddThis Button END -->
		</div>
                                
      </div><!-- .span4 -->
            
    </div><!-- .row -->
   
   <!--<div class="row-fluid"> 
    <div class="span12">
		<ul class="pager">
              <li class="previous">
                <a href="#">← Older Portfolio Item</a>
              </li>
              <li class="next">
                <a href="#">Newer Portfolio Item →</a>
              </li>
		</ul> 
    </div>
</div>-->
   <?php if ($products) { ?>
	<h2 class="page-header"><span>Related Portfolio Items</span></h2>
	<div class="sidebar-line"><span></span></div>    
                
    <ul class="thumbnails">
    <?php $j=0; foreach ($products as $product) { ?>
      <li class="span3">
        <div class="thumbnail">
           <?php if ($product['thumb']) { ?>
	      <a href="<?php echo $product['href']; ?>"><img src="<?php echo $product['thumb']; ?>" title="<?php echo $product['name']; ?>" alt="<?php echo $product['name']; ?>" /></a>
	      <?php } ?>
          <div class="caption">
            <h3 class="h5"><a href="<?php echo $product['href']; ?>"><?php echo $product['name']; ?></a></h3>
          </div>
        </div><!-- .thumbnail -->
      </li>
      <?php } ?>
    </ul>
 	<?php } ?> 

			</div><!-- end post span -->              
		</div>
    

<?php } else { ?>	
			<ul class="breadcrumb">
                <?php foreach ($breadcrumbs as $breadcrumb) { ?>
			    <?php echo $breadcrumb['separator']; ?><a href="<?php echo $breadcrumb['href']; ?>"><?php echo $breadcrumb['text']; ?></a>
			    <?php } ?>
            </ul>
            
    		<div class="row">
            
			<div class="<?php if ($column_right!=null) { ?>span9 <?php } else { ?>span12 <?php } ?> post">
				<h2 class="page-header"><span><?php echo $heading_title; ?></span></h2>
				<div class="sidebar-line"><span></span></div>                    
                    <div class="row-fluid product-info">
                     
                        <div class=" <?php if ($column_right!=null) { ?>span7 <?php } else { ?>span4 <?php } ?>">
                            <?php if ($thumb || $images) { ?>
                            <?php if ($thumb) { ?>
                            <div class="cf">
                                <span class="productwrap"><img id="demo4" src="<?php echo $thumb; ?>"></span>
							</div>
						   
						    <?php } else { ?>
						      
                            <div class="cf">
                                <span class="productwrap"><img id="demo4" src="<?php echo $small; ?>"></span>
							<div class="elastislide-wrapper elastislide-horizontal"><div class="elastislide-carousel">
							<ul style="display: block; max-height: 300px; transform: translateX(-112px); transition: all 500ms ease-in-out 0s;" id="demo4carousel" class="elastislide-list">
							 <?php foreach ($images as $image) { ?>
					       <li style="width: 24.8826%; max-width: 400px; max-height: 300px;">
							<a href="<?php echo $image['popup']; ?>"><img src="<?php echo $image['thumb']; ?>" data-largeimg="<?php echo $image['popup']; ?>"></a></li>
					        <?php } ?>
							</ul>
							</div><nav><span class="elastislide-prev">Previous</span><span class="elastislide-next">Next</span></nav></div>
						</div>
						<?php } ?>
						 <?php } ?>
					</div>

                        <div class="<?php if ($column_right!=null) { ?>span5 <?php } else { ?>span4 <?php } ?>">
                        	<h2 class="post-title"><?php echo $heading_title; ?></h2>
                	<p><?php echo $description; ?></p>
               
              		 <?php if ($column_right==null) { ?>
              		 </div>
              		 <div class="span4">
              		 <?php } ?>
                      <?php if ($price) { ?>
				      <div class="price">
				        <?php if (!$special) { ?>
				        <?php echo $price; ?>
				        <?php } else { ?>
				        <span class="price-old"><?php echo $price; ?></span> 
				        <span class="price-new"><?php echo $special; ?></span>
				        <?php } ?>
				      
				        <?php if ($tax) { ?>
				        <span class="price-tax"><?php echo $text_tax; ?> <?php echo $tax; ?></span><br />
				        <?php } ?>
				        <?php if ($points) { ?>
				        <span class="reward"><small><?php echo $text_points; ?> <?php echo $points; ?></small></span>
				        <?php } ?>
				        <?php if ($discounts) { ?>
				        <br />
				        <div class="discount">
				          <?php foreach ($discounts as $discount) { ?>
				          <?php echo sprintf($text_discount, $discount['quantity'], $discount['price']); ?><br />
				          <?php } ?>
				        </div>
				        <?php } ?>
				      </div>
				      <?php } ?>
	
				      
                                <div class="row-fluid">
                                    <div class="span6">
                                        <input type="text" name="quantity" size="2" value="<?php echo $minimum; ?>" />
         								<input type="hidden" name="product_id" size="2" value="<?php echo $product_id; ?>" />
                                    </div>
                                    
                                    <div class="span6">
                                        <a id="button-cart" title="<?php echo $button_cart; ?>" class="btn btn-general">
                                        <span><i class="icon-shopping-cart"></i> Add to Cart</span>
                                        </a>
									</div>
									<div>
									<span>&nbsp;&nbsp;&nbsp;<?php echo $text_or; ?></span></div>
							         
									 <span class="links"><a onclick="addToWishList('<?php echo $product_id; ?>');" class="addtowishlist-product-info"><?php echo $button_wishlist; ?></a>
							         <a onclick="addToCompare('<?php echo $product_id; ?>');" class="addtocompare-product-info"><?php echo $button_compare; ?></a></span>
									
									
									
							        <?php if ($minimum > 1) { ?>
							        <div class="minimum"><?php echo $text_minimum; ?></div>
							        <?php } ?>
                                </div>

                    			<div class="row-fluid">
                                	<?php if ($options) { ?>
								      <div class="options">
								        <h2><?php echo $text_option; ?></h2>
								        <br />
								        <?php foreach ($options as $option) { ?>
								        <?php if ($option['type'] == 'select') { ?>
								        <div id="option-<?php echo $option['product_option_id']; ?>" class="option">
								          <?php if ($option['required']) { ?>
								          <span class="required">*</span>
								          <?php } ?>
								          <b><?php echo $option['name']; ?>:</b><br />
								          <select name="option[<?php echo $option['product_option_id']; ?>]">
								            <option value=""><?php echo $text_select; ?></option>
								            <?php foreach ($option['option_value'] as $option_value) { ?>
								            <option value="<?php echo $option_value['product_option_value_id']; ?>"><?php echo $option_value['name']; ?>
								            <?php if ($option_value['price']) { ?>
								            (<?php echo $option_value['price_prefix']; ?><?php echo $option_value['price']; ?>)
								            <?php } ?>
								            </option>
								            <?php } ?>
								          </select>
								        </div>
								        <br />
								        <?php } ?>
								        <?php if ($option['type'] == 'radio') { ?>
								        <div id="option-<?php echo $option['product_option_id']; ?>" class="option">
								          <?php if ($option['required']) { ?>
								          <span class="required">*</span>
								          <?php } ?>
								          <b><?php echo $option['name']; ?>:</b><br />
								          <?php foreach ($option['option_value'] as $option_value) { ?>
								          <input type="radio" name="option[<?php echo $option['product_option_id']; ?>]" value="<?php echo $option_value['product_option_value_id']; ?>" id="option-value-<?php echo $option_value['product_option_value_id']; ?>" />
								          <label for="option-value-<?php echo $option_value['product_option_value_id']; ?>"><?php echo $option_value['name']; ?>
								            <?php if ($option_value['price']) { ?>
								            (<?php echo $option_value['price_prefix']; ?><?php echo $option_value['price']; ?>)
								            <?php } ?>
								          </label>
								          <br />
								          <?php } ?>
								        </div>
								        <br />
								        <?php } ?>
								        <?php if ($option['type'] == 'checkbox') { ?>
								        <div id="option-<?php echo $option['product_option_id']; ?>" class="option">
								          <?php if ($option['required']) { ?>
								          <span class="required">*</span>
								          <?php } ?>
								          <b><?php echo $option['name']; ?>:</b><br />
								          <?php foreach ($option['option_value'] as $option_value) { ?>
								          <input type="checkbox" name="option[<?php echo $option['product_option_id']; ?>][]" value="<?php echo $option_value['product_option_value_id']; ?>" id="option-value-<?php echo $option_value['product_option_value_id']; ?>" />
								          <label for="option-value-<?php echo $option_value['product_option_value_id']; ?>"><?php echo $option_value['name']; ?>
								            <?php if ($option_value['price']) { ?>
								            (<?php echo $option_value['price_prefix']; ?><?php echo $option_value['price']; ?>)
								            <?php } ?>
								          </label>
								          <br />
								          <?php } ?>
								        </div>
								        <br />
								        <?php } ?>
								        <?php if ($option['type'] == 'image') { ?>
								        <div id="option-<?php echo $option['product_option_id']; ?>" class="option">
								          <?php if ($option['required']) { ?>
								          <span class="required">*</span>
								          <?php } ?>
								          <b><?php echo $option['name']; ?>:</b><br />
								          <table class="option-image">
								            <?php foreach ($option['option_value'] as $option_value) { ?>
								            <tr>
								              <td style="width: 1px;"><input type="radio" name="option[<?php echo $option['product_option_id']; ?>]" value="<?php echo $option_value['product_option_value_id']; ?>" id="option-value-<?php echo $option_value['product_option_value_id']; ?>" /></td>
								              <td><label for="option-value-<?php echo $option_value['product_option_value_id']; ?>"><img src="<?php echo $option_value['image']; ?>" alt="<?php echo $option_value['name'] . ($option_value['price'] ? ' ' . $option_value['price_prefix'] . $option_value['price'] : ''); ?>" /></label></td>
								              <td><label for="option-value-<?php echo $option_value['product_option_value_id']; ?>"><?php echo $option_value['name']; ?>
								                  <?php if ($option_value['price']) { ?>
								                  (<?php echo $option_value['price_prefix']; ?><?php echo $option_value['price']; ?>)
								                  <?php } ?>
								                </label></td>
								            </tr>
								            <?php } ?>
								          </table>
								        </div>
								        <br />
								        <?php } ?>
								        <?php if ($option['type'] == 'text') { ?>
								        <div id="option-<?php echo $option['product_option_id']; ?>" class="option">
								          <?php if ($option['required']) { ?>
								          <span class="required">*</span>
								          <?php } ?>
								          <b><?php echo $option['name']; ?>:</b><br />
								          <input type="text" name="option[<?php echo $option['product_option_id']; ?>]" value="<?php echo $option['option_value']; ?>" />
								        </div>
								        <br />
								        <?php } ?>
								        <?php if ($option['type'] == 'textarea') { ?>
								        <div id="option-<?php echo $option['product_option_id']; ?>" class="option">
								          <?php if ($option['required']) { ?>
								          <span class="required">*</span>
								          <?php } ?>
								          <b><?php echo $option['name']; ?>:</b><br />
								          <textarea name="option[<?php echo $option['product_option_id']; ?>]" cols="30" rows="5"><?php echo $option['option_value']; ?></textarea>
								        </div>
								        <br />
								        <?php } ?>
								        <?php if ($option['type'] == 'file') { ?>
								        <div id="option-<?php echo $option['product_option_id']; ?>" class="option">
								          <?php if ($option['required']) { ?>
								          <span class="required">*</span>
								          <?php } ?>
								          <b><?php echo $option['name']; ?>:</b><br />
								          <input type="button" value="<?php echo $button_upload; ?>" id="button-option-<?php echo $option['product_option_id']; ?>" class="btn btn-primary btn-general button">
								          <input type="hidden" name="option[<?php echo $option['product_option_id']; ?>]" value="" />
								        </div>
								        <br />
								        <?php } ?>
								        <?php if ($option['type'] == 'date') { ?>
								        <div id="option-<?php echo $option['product_option_id']; ?>" class="option">
								          <?php if ($option['required']) { ?>
								          <span class="required">*</span>
								          <?php } ?>
								          <b><?php echo $option['name']; ?>:</b><br />
								          <input type="text" name="option[<?php echo $option['product_option_id']; ?>]" value="<?php echo $option['option_value']; ?>" class="date" />
								        </div>
								        <br />
								        <?php } ?>
								        <?php if ($option['type'] == 'datetime') { ?>
								        <div id="option-<?php echo $option['product_option_id']; ?>" class="option">
								          <?php if ($option['required']) { ?>
								          <span class="required">*</span>
								          <?php } ?>
								          <b><?php echo $option['name']; ?>:</b><br />
								          <input type="text" name="option[<?php echo $option['product_option_id']; ?>]" value="<?php echo $option['option_value']; ?>" class="datetime" />
								        </div>
								        <br />
								        <?php } ?>
								        <?php if ($option['type'] == 'time') { ?>
								        <div id="option-<?php echo $option['product_option_id']; ?>" class="option">
								          <?php if ($option['required']) { ?>
								          <span class="required">*</span>
								          <?php } ?>
								          <b><?php echo $option['name']; ?>:</b><br />
								          <input type="text" name="option[<?php echo $option['product_option_id']; ?>]" value="<?php echo $option['option_value']; ?>" class="time" />
								        </div>
								        <br />
								        <?php } ?>
								        <?php } ?>
								      </div>
								      <?php } ?>
                                </div>
                                
                                <div class="deal-share">
                                    <!-- AddThis Button BEGIN -->
                                    <div class="addthis_toolbox addthis_default_style">
                                    <a class="addthis_button_facebook_like" fb:like:layout="button_count"></a>
                                    <a class="addthis_button_tweet"></a>
                                    <a class="addthis_button_google_plusone" g:plusone:size="medium"></a>
                                    </div>
                                    <script type="text/javascript" src="//s7.addthis.com/js/300/addthis_widget.js#pubid=undefined"></script>
                                    <!-- AddThis Button END -->
								</div>
                                
                        </div>
                        
                        
                    </div>
                    
			<!-- Start Review Area" -->
			<section id="TabElements" class="product-info">
                <ul id="myTab" class="nav nav-tabs">
                  <li class="active"><a href="#information" data-toggle="tab"><?php echo $tab_description; ?></a></li>
                  <li><a href="#reviews" data-toggle="tab"><?php echo $tab_review; ?></a></li>
                  <li><a href="#tags" data-toggle="tab">Tags</a></li>
                </ul>
                <div id="myTabContent" class="tab-content">
                  <div class="tab-pane fade in active" id="information">
                        <?php echo $description; ?>
                  </div>
                  <div class="tab-pane fade" id="reviews">
                  	 <?php if ($review_status) { ?>
                  		<div class="row-fluid">
                    	<div class="span6" id="review">
							
						</div>
                    	<div class="span6">
                          <section class="single-review" style="margin-top:-30px;">
                           <h3 class="page-header">Leave a Review</h3>
                           <h2 id="review-title"><?php echo $text_write; ?></h2>
                            <form>
                                <label for="name"><?php echo $entry_name; ?></label>
                               	<input type="text" name="name" class="span9" value="" />
                                <label for="email">Email</label>
                                <input id="email" name="email" class="span9" type="email">
                                <label for="comment"><?php echo $entry_review; ?></label>
                                <textarea name="text" cols="45" class="span12" rows="5"></textarea>
                                <br>
                            	<a class="btn btn-general" id="button-review" href="javascript:;">Post a Review</a>
                            </form>
                            <div class="review-header" style="margin-top:20px;">
							  	<p>What is your rating for this product?</p>
							    <input type="radio" name="rating" value="1" />
							    &nbsp;
							    <input type="radio" name="rating" value="2" />
							    &nbsp;
							    <input type="radio" name="rating" value="3" />
							    &nbsp;
							    <input type="radio" name="rating" value="4" />
							    &nbsp;
							    <input type="radio" name="rating" value="5" />
							  </div><!--end review-header-->
						</section>
						</div>
                    </div>
                    <?php } ?>
                  </div>
                  <div class="tab-pane fade" id="tags">
                   <?php for ($i = 0; $i < count($tags); $i++) { ?>
				    <?php if ($i < (count($tags) - 1)) { ?>
				    <a href="<?php echo $tags[$i]['href']; ?>"><?php echo $tags[$i]['tag']; ?></a>,
				    <?php } else { ?>
				    <a href="<?php echo $tags[$i]['href']; ?>"><?php echo $tags[$i]['tag']; ?></a>
				    <?php } ?>
				    <?php } ?>
					
                  </div>
                </div>
			</section>
                    
			<!-- Start Related -->
    	
    	   <?php if ($products) { ?>
    	<div class="row-fluid">
			<div class="span12">
               <h2 class="widget-title"><span>Related Project's</span></h2>
				<div class="sidebar-line"><span></span></div>
				<div class="for-womans flexslider flex-direction-nav-on-top">
						<ul class="slides">
							<?php $j=0; foreach ($products as $product) { ?>
							 <?php if ($column_right==null) { $temp = 6;} else {$temp = 3;} ?>
   							 <?php if($j==0 || $j%$temp ==0) { ?>
		                     <li>
		                     <?php } ?>
							<div class=" <?php if ($column_right==null) { ?>span2 <?php } else { ?> span4 <?php } ?>">
								<div class="wdt-product">
									<div class="wdt-products-wrapper">
										<div class="wdt-product active show">
										  <?php if ($product['thumb']) { ?>
									      <a href="<?php echo $product['href']; ?>"><img src="<?php echo $product['thumb']; ?>" title="<?php echo $product['name']; ?>" alt="<?php echo $product['name']; ?>" /></a>
									      <?php } ?>
											
											<h4><a href="<?php echo $product['href']; ?>" title="<?php echo $product['name']; ?>"><?php echo $product['name']; ?></a></h4>
                                             <ul class="rating">
		                                   	<?php for($i=1;$i<6; $i++) { ?>
		                                    <?php if ($i <= $product['rating']) {?>
		                                   	 	<li><i class="star-on"></i></li>
		                                    <?php } else { ?>
		                                    	<li><i class="star-off"></i></li>
		                                    <?php } ?>
		                                    <?php } ?>
		                                    </ul>
											<div class="wdt-pricing">
											<span class="amount"> <?php echo $product['price']; ?></span>
											</div>
											<div class="wdt-cart">
												<div class="wdt-cart-bar">
													<a href="javascript:;" onclick="addToCart('<?php echo $product['product_id']; ?>');" title="<?php echo $product['name']; ?>"><i class="icon-shopping-cart"></i> <?php echo $button_cart; ?></a>
												</div>
											</div>
											<div class="wdt-overlay">
												<span class="amount"> <?php echo $product['price']; ?></span>
											</div>
										</div>
									</div>
								</div>
							</div>
							<?php if(($j+1)%$temp ==0) { ?>
		                   	</li>
		                    <?php } ?>
	                    <?php $j++; } ?>
						</ul>
						</div>
						</div>
			</div>             
           <?php } ?> 
   

			</div><!-- end post span -->
      
                
			<div class="span3 sidebar">
			<?php echo $content_tg_user4; ?>
            <?php echo $column_right; ?>
                </div>
                </div>

<script type="text/javascript"><!--
$(document).ready(function() {
	$('.colorbox').colorbox({
		overlayClose: true,
		opacity: 0.5,
		rel: "colorbox"
	});
});
//--></script> 
<script type="text/javascript"><!--
$('#button-cart').bind('click', function() {
	$.ajax({
		url: 'index.php?route=checkout/cart/add',
		type: 'post',
		data: $('.product-info input[type=\'text\'], .product-info input[type=\'hidden\'], .product-info input[type=\'radio\']:checked, .product-info input[type=\'checkbox\']:checked, .product-info select, .product-info textarea'),
		dataType: 'json',
		success: function(json) {
			$('.success, .warning, .attention, information, .error').remove();
			
			if (json['error']) {
				if (json['error']['option']) {
					for (i in json['error']['option']) {
						$('#option-' + i).after('<span class="error">' + json['error']['option'][i] + '</span>');
					}
				}
			} 
			
			if (json['success']) {
				$('#notification').html('<div class="success" style="display: none;">' + json['success'] + '<img src="catalog/view/theme/default/image/close.png" alt="" class="close" /></div>');
					
				$('.success').fadeIn('slow');
					
				$('#cart-total').html(json['total']);
				
				$('#tg_bistro_cart').load('index.php?route=module/tg_bistro_cart');
				
		
				$('html, body').animate({ scrollTop: 0 }, 'slow'); 
			}	
		}
	});
});
//--></script>
<?php if ($options) { ?>
<script type="text/javascript" src="catalog/view/javascript/jquery/ajaxupload.js"></script>
<?php foreach ($options as $option) { ?>
<?php if ($option['type'] == 'file') { ?>
<script type="text/javascript"><!--
new AjaxUpload('#button-option-<?php echo $option['product_option_id']; ?>', {
	action: 'index.php?route=product/product/upload',
	name: 'file',
	autoSubmit: true,
	responseType: 'json',
	onSubmit: function(file, extension) {
		$('#button-option-<?php echo $option['product_option_id']; ?>').after('<img src="catalog/view/theme/default/image/loading.gif" class="loading" style="padding-left: 5px;" />');
		$('#button-option-<?php echo $option['product_option_id']; ?>').attr('disabled', true);
	},
	onComplete: function(file, json) {
		$('#button-option-<?php echo $option['product_option_id']; ?>').attr('disabled', false);
		
		$('.error').remove();
		
		if (json['success']) {
			alert(json['success']);
			
			$('input[name=\'option[<?php echo $option['product_option_id']; ?>]\']').attr('value', json['file']);
		}
		
		if (json['error']) {
			$('#option-<?php echo $option['product_option_id']; ?>').after('<span class="error">' + json['error'] + '</span>');
		}
		
		$('.loading').remove();	
	}
});
//--></script>
<?php } ?>
<?php } ?>
<?php } ?>
<script type="text/javascript"><!--
$('#review .pagination a').live('click', function() {
	$('#review').fadeOut('slow');
		
	$('#review').load(this.href);
	
	$('#review').fadeIn('slow');
	
	return false;
});			

$('#review').load('index.php?route=product/product/review&product_id=<?php echo $product_id; ?>');

$('#button-review').bind('click', function() {
	$.ajax({
		url: 'index.php?route=product/product/write&product_id=<?php echo $product_id; ?>',
		type: 'post',
		dataType: 'json',
		data: 'name=' + encodeURIComponent($('input[name=\'name\']').val()) + '&text=' + encodeURIComponent($('textarea[name=\'text\']').val()) + '&rating=' + encodeURIComponent($('input[name=\'rating\']:checked').val() ? $('input[name=\'rating\']:checked').val() : '') + '&captcha=' + encodeURIComponent($('input[name=\'captcha\']').val()),
		beforeSend: function() {
			$('.success, .warning').remove();
			$('#button-review').attr('disabled', true);
			$('#review-title').after('<div class="attention"><img src="catalog/view/theme/default/image/loading.gif" alt="" /> <?php echo $text_wait; ?></div>');
		},
		complete: function() {
			$('#button-review').attr('disabled', false);
			$('.attention').remove();
		},
		success: function(data) {
			if (data['error']) {
				$('#review-title').after('<div class="warning">' + data['error'] + '</div>');
			}
			
			if (data['success']) {
				$('#review-title').after('<div class="success">' + data['success'] + '</div>');
								
				$('input[name=\'name\']').val('');
				$('textarea[name=\'text\']').val('');
				$('input[name=\'rating\']:checked').attr('checked', '');
				$('input[name=\'captcha\']').val('');
			}
		}
	});
});
//--></script> 
<script type="text/javascript"><!--
$('#tabs a').tabs();
//--></script> 
<script type="text/javascript" src="catalog/view/javascript/jquery/ui/jquery-ui-timepicker-addon.js"></script> 
<script type="text/javascript"><!--

//--></script>   
<?php } ?>              
<?php echo $content_bottom; ?>
</div>
<?php echo $footer; ?>
  	




